package com.kgc.scd.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * collect
 * @author 
 */
public class Collect implements Serializable {
    /**
     * 收藏ID（自增）
     */
    @ApiModelProperty("收藏ID")
    private Integer collId;

    /**
     * 收藏用户id
     */
    @ApiModelProperty("收藏用户id")
    private String collUid;

    /**
     * 收藏日期（默认当前时间）
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("收藏日期")
    private Date collDate;

    private String collProid;

    private static final long serialVersionUID = 1L;

    public Integer getCollId() {
        return collId;
    }

    public void setCollId(Integer collId) {
        this.collId = collId;
    }

    public String getCollUid() {
        return collUid;
    }

    public void setCollUid(String collUid) {
        this.collUid = collUid;
    }

    public Date getCollDate() {
        return collDate;
    }

    public void setCollDate(Date collDate) {
        this.collDate = collDate;
    }

    public String getCollProid() {
        return collProid;
    }

    public void setCollProid(String collProid) {
        this.collProid = collProid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Collect other = (Collect) that;
        return (this.getCollId() == null ? other.getCollId() == null : this.getCollId().equals(other.getCollId()))
            && (this.getCollUid() == null ? other.getCollUid() == null : this.getCollUid().equals(other.getCollUid()))
            && (this.getCollDate() == null ? other.getCollDate() == null : this.getCollDate().equals(other.getCollDate()))
            && (this.getCollProid() == null ? other.getCollProid() == null : this.getCollProid().equals(other.getCollProid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCollId() == null) ? 0 : getCollId().hashCode());
        result = prime * result + ((getCollUid() == null) ? 0 : getCollUid().hashCode());
        result = prime * result + ((getCollDate() == null) ? 0 : getCollDate().hashCode());
        result = prime * result + ((getCollProid() == null) ? 0 : getCollProid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", collId=").append(collId);
        sb.append(", collUid=").append(collUid);
        sb.append(", collDate=").append(collDate);
        sb.append(", collProid=").append(collProid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}